home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / f2c-stab.9 / f2c-stab / f2c-stabs / fts-f2si < prev    next >
Encoding:
Text File  |  1996-02-11  |  1.8 KB  |  66 lines

  1. #!/bin/bash
  2. #
  3. # $Header: /usr/bfr/src/test/RCS/fts-f2si,v 1.1 1995/01/18 17:39:14 abel Exp $
  4. #
  5. #********************************************
  6. #
  7. # FORTRAN -> subbr info translator
  8. #
  9. #********************************************
  10. #
  11. # Written by Alexander L. Belikoff, 1994
  12. # Copyright (C)1994 Alexander L. Belikoff
  13. #
  14. # This program is free software; you can redistribute it and/or modify
  15. # it under the terms of the GNU General Public License as published by
  16. # the Free Software Foundation; either version 2 of the License, or
  17. # (at your option) any later version.
  18. #
  19. # This program is distributed in the hope that it will be useful,
  20. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22. # GNU General Public License for more details.
  23. #
  24. #********************************************
  25. #
  26. # $Log: fts-f2si,v $
  27. # Revision 1.1  1995/01/18  17:39:14  abel
  28. # Initial revision
  29. #
  30. #
  31. #********************************************
  32.  
  33.  
  34. if [ $# -lt 1 ] ; then
  35.     echo "Usage:        `basename $0` fortran_file fortran_file ...
  36.  
  37. For each file foo.f on the command line, outputs foo.si - a subroutine
  38. information file.  The .si file contains information about each
  39. subroutine and function declared in foo.f, such as its arguments,
  40. and local variables (and their types and dimensions), and included
  41. files.  The data is output in an easy to parse format for use by tools
  42. such as make-test-routines and an as yet unreleased f2c-stab file
  43. generator.
  44. "
  45.     exit 1
  46. fi
  47.  
  48. for module in $@ ; do
  49.  
  50.    resfile=`basename $module .f`.si
  51.  
  52.  
  53.    if [ ! -f $module ] ; then
  54.        echo "`basename $0`: ERROR:  $module does not exist."
  55.    fi
  56.  
  57.  
  58.    fts-f-strip-cmts $module |
  59.       fts-f-unsplit         |
  60.       fts-f-split-decls     |
  61.       fts-f2si.awk MODULE=$module > $resfile
  62.  
  63. done
  64.  
  65. # end of $Source: /usr/bfr/src/test/RCS/fts-f2si,v $
  66.